#!/usr/bin/env python3

def main():
    f = open("./testfile", "r+")

    #  f.write("KYO")
    print(f.tell())
    f.writelines(["KYO\n", "HELLO\n", "WWW\n"])
    print(f.tell())
    f.flush()

    #  input()

    #  s = f.read()
    s = f.readline()
    #  s = f.readlines()
    print(s)

    f.close()


if __name__ == "__main__":
    main()
